-- ==================== leap.nvim ====================
local leap = require('leap')
vim.api.nvim_set_hl(0, 'LeapBackdrop', { link = 'Comment' }) -- or some grey
leap.opts.highlight_unlabeled_phase_one_targets = true
leap.opts.safe_labels = {}
leap.opts.labels = { 'a', 'r', 's', 't', 'n', 'e', 'i', 'o', 'w', 'f', 'u', 'y', 'd', 'h' }
vim.keymap.set("n", "<space><space>", function()
  local current_window = vim.fn.win_getid()
  leap.leap { target_windows = { current_window } }
end)
vim.keymap.set("v", "<space><space>", function()
  local current_window = vim.fn.win_getid()
  leap.leap { target_windows = { current_window } }
end)
